Xamarin Database insert in SQL Lite

84

Xamarin Database insert in SQL Lite -

//******* For More Tutorial - NAYCode.com
public Task SaveEmployeeAsync(Employee emp)
{
   return _db.InsertAsync(emp);
}

Xamarin Database insert in SQL Lite -

//********* NAYCode.com
public void SaveRegister(string str_user)
   {
            Employee emp = new Employee();
           
            emp.EmpID= txtEmp.Text;
            emp.EmpNo = txtEmp.Text;
            emp.UserName = str_user;
            emp.DeviceID= "test";
            emp.IsActive = 0;
            emp.IsRegister = 1;

            App.EmpDB.SaveEmployeeAsync(emp);

    }

Comments

Submit
0 Comments